{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. September 28, 2015 In-class Activity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"CS240: Fall 2015, Blank\n",
"\n",
"For Wednesday, read chapter 7 and come prepared for a classroom activity.\n",
"\n",
"Today, you will be assigned a partner. You will work in pairs on one computer, switching \"drivers\" every 15 minutes."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.1 Draw a flow chart for Example 1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"format": "column"
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%dot\n",
"\n",
"digraph flowchart {\n",
" rankdir=TB\n",
" fontname=Helvetica\n",
" node [peripheries=0, \n",
" style=filled, \n",
" fontname=Helvetica, \n",
" fixedsize=true, \n",
" width=1.8, \n",
" height=0.8]\n",
" edge [fontname=Helvetica, \n",
" fontsize=12, \n",
" fontcolor=blue, \n",
" labeldistance=1.8]\n",
"\n",
" init [shape=box, label=\"R0 \\<- 0\\nR1 \\<- #-5\"]\n",
" load [shape=box, label=\"R2 \\<- R1\"]\n",
" test [shape=diamond, label=\"BRz\"]\n",
" incr [shape=box, label=\"R1 \\<- R1 + 1\"]\n",
" complete [shape=box, height=0.8, label=\"HALT\"]\n",
"\n",
" init -> load\n",
" load -> test \n",
" test -> incr [headlabel=\"no\"]\n",
" incr -> load \n",
" test -> complete [headlabel=\"yes\"]\n",
" \n",
" { rank=same; incr test }\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.2 Fix Example 4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.3 Write a program to put the numbers 1 through 1,000 into memory starting at x3100."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.4 Write a program to add up those numbers."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.5 Write a program to count the number of 1 bits in a memory location"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.6 Write a program to count the number of 1 bits in itself"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you finish the above, do Exercises 6.7, 6.14, 6.19"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Calysto LC3",
"language": "gas",
"name": "calysto_lc3"
},
"language_info": {
"codemirror_mode": {
"name": "gas",
"version": 3
},
"file_extension": ".asm",
"mimetype": "text/x-gas",
"name": "gas"
}
},
"nbformat": 4,
"nbformat_minor": 0
}